package com.aspose.cells.a.d.a.a;

import java.awt.Color;
import java.awt.geom.AffineTransform;
import java.awt.image.AffineTransformOp;
import java.awt.image.BufferedImage;
import java.awt.image.ColorModel;
import java.io.IOException;

public class zs extends com.aspose.cells.a.d.a.zg {
   private int b;
   private int c;
   private BufferedImage d;

   public zs() {
      super(94, 1);
   }

   public zs(int var1, BufferedImage var2) {
      super(94, 1);
      this.b = var1;
      AffineTransform var3 = new AffineTransform();
      var3.rotate(3.141592653589793D, (double)(var2.getWidth() / 2), (double)(var2.getHeight() / 2));
      AffineTransformOp var4 = new AffineTransformOp(var3, 2);
      this.d = var4.filter(var2, (BufferedImage)null);
      this.c = 0;
   }

   public void a(int var1, com.aspose.cells.a.d.a.zb var2) throws IOException {
      var2.b(this.b);
      var2.b(this.c);
      byte var3 = 32;
      var2.b(var3);
      var2.b(40);
      var2.b(var3 + 40);
      ColorModel var4 = this.d.getColorModel();
      boolean var5 = var4.hasAlpha();
      byte var6 = 4;
      String var7 = "*BGR";
      byte var8 = 24;
      if (var5) {
         var7 = "*BGRA";
         var6 = 1;
         var8 = 32;
      }

      byte[] var9 = com.aspose.cells.a.d.b.zb.a(this.d, (Color)null, var7, var6);
      var2.b(var9.length);
      byte var10 = 0;
      zn var11 = new zn(this.d.getWidth(), this.d.getHeight(), var8, var10, var9.length, 0, 0, 0, 0);
      var2.write(var11.a());
      var2.write(var9);
   }
}
